SET(CMAKE_SYSTEM_NAME Linux)
SET(TOOLCHAIN_DIR "/usr")

SET(CMAKE_C_COMPILER ${TOOLCHAIN_DIR}/bin/gcc)
SET(CMAKE_CXX_COMPILER ${TOOLCHAIN_DIR}/bin/g++)

set(CMAKE_C_FLAGS "-std=c99")
set(CMAKE_CXX_FLAGS "-lstdc++")

# search for programs in the build host directories (not necessary)
SET(CMAKE_FIND_ROOT_PATH ${TOOLCHAIN_DIR})
SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)

# for libraries and headers in the target directories
SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)


